package asteroids.model.programs.parsing.statements;

import be.kuleuven.cs.som.annotate.Basic;
import asteroids.model.Ship;

/**
 * A class of thrust statements.
 * A thrust statement makes the ship that executes the program thrust.
 * 
 * @author Thijs Dieltjens - Wim Konings
 * @version 2.0
 */
public class Thrust extends Action{

	public Thrust(boolean thrust,int line, int column){
		super(line,column);
		this.thrust=thrust;
	}

	@Basic
	public boolean getThrust() {
		return thrust;
	}

	private boolean thrust;

	@Override
	public void execute(Ship ship) {
		if(ship!=null){
			((Ship) ship).setThruster(getThrust());		}
	}
}
